/*      */ package dm.sql;
/*      */ 
/*      */ import dm.jdbc.dataConvertion.CType2JType;
/*      */ import dm.jdbc.dbaccess.Const;
/*      */ import dm.jdbc.dbaccess.DBError;
/*      */ import dm.jdbc.desc.CommDesc;
/*      */ import dm.jdbc.driver.DmdbConnection_bs;
/*      */ import java.io.InputStream;
/*      */ import java.io.Reader;
/*      */ import java.math.BigDecimal;
/*      */ import java.net.URL;
/*      */ import java.sql.Array;
/*      */ import java.sql.Blob;
/*      */ import java.sql.Clob;
/*      */ import java.sql.Date;
/*      */ import java.sql.Ref;
/*      */ import java.sql.ResultSet;
/*      */ import java.sql.ResultSetMetaData;
/*      */ import java.sql.SQLException;
/*      */ import java.sql.SQLWarning;
/*      */ import java.sql.Statement;
/*      */ import java.sql.Time;
/*      */ import java.sql.Timestamp;
/*      */ import java.util.Calendar;
/*      */ import java.util.Map;
/*      */ import java.util.ResourceBundle;
/*      */ 
/*      */ public class DmdbArrayDataResultSet implements ResultSet
/*      */ {
/*   30 */   private ARRAY m_array = null;
/*   31 */   private long m_startIndex = 1L;
/*   32 */   private int m_rowCount = 0;
/*      */   
/*   34 */   private int m_curRowNum = (int)(this.m_startIndex - 1L);
/*   35 */   private boolean m_isClosed = false;
/*   36 */   private boolean m_wasPrivColNull = false;
/*      */   
/*   38 */   private DmdbConnection_bs m_conn = null;
/*      */   
/*   40 */   private int m_direction = 1000;
/*   41 */   private int m_type = 1003;
/*   42 */   private int m_conCurrency = 1007;
/*   43 */   private int m_fetchSize = -1;
/*      */   
/*      */   DmdbArrayDataResultSet(ARRAY arr) {
/*   46 */     this.m_array = arr;
/*   47 */     TypeDescriptor arrItemDesc = this.m_array.m_arrDesc.getItemDesc();
/*   48 */     this.m_rowCount = this.m_array.m_arrData.length;
/*   49 */     this.m_conn = arrItemDesc.m_conn;
/*   50 */     this.m_startIndex = 1L;
/*   51 */     this.m_curRowNum = ((int)(this.m_startIndex - 1L));
/*      */   }
/*      */   
/*      */   public DmdbArrayDataResultSet(ARRAY arr, long index, int count) {
/*   55 */     this(arr);
/*      */     
/*   57 */     this.m_startIndex = index;
/*   58 */     this.m_rowCount = (this.m_rowCount < count ? this.m_rowCount : count);
/*   59 */     this.m_curRowNum = ((int)(this.m_startIndex - 1L));
/*      */   }
/*      */   
/*      */   private void checkClose() throws SQLException {
/*   63 */     if (this.m_isClosed)
/*   64 */       DBError.throwSQLException(6034);
/*      */   }
/*      */   
/*      */   private void checkCurrentRow() throws SQLException {
/*   68 */     checkClose();
/*      */     
/*   70 */     if ((this.m_curRowNum < this.m_startIndex) && (this.m_curRowNum > this.m_rowCount))
/*   71 */       throw new SQLException(
/*   72 */         Const.res.getString("error.cursorNotInResultSet"));
/*      */   }
/*      */   
/*      */   private boolean checkIsNull(TypeData typeData) {
/*   76 */     if ((typeData.m_dataBuf == null) && (typeData.m_dumyData == null)) {
/*   77 */       this.m_wasPrivColNull = true;
/*      */     } else {
/*   79 */       this.m_wasPrivColNull = false;
/*      */     }
/*   81 */     return this.m_wasPrivColNull;
/*      */   }
/*      */   
/*      */   private void release() {
/*   85 */     this.m_conn = null;
/*   86 */     this.m_array = null;
/*   87 */     this.m_rowCount = 0;
/*   88 */     this.m_startIndex = 1L;
/*      */     
/*   90 */     this.m_isClosed = true;
/*      */   }
/*      */   
/*      */   private void checkUpdatable() throws SQLException {
/*   94 */     throw new SQLException(Const.res.getString("error.arrayRsUptNotSpt"));
/*      */   }
/*      */   
/*      */   public boolean next() throws SQLException {
/*   98 */     checkClose();
/*      */     
/*  100 */     if (this.m_rowCount > this.m_curRowNum) {
/*  101 */       this.m_curRowNum += 1;
/*      */       
/*  103 */       return true;
/*      */     }
/*      */     
/*  106 */     return false;
/*      */   }
/*      */   
/*      */   public void close() throws SQLException {
/*  110 */     if (this.m_isClosed) {
/*  111 */       return;
/*      */     }
/*  113 */     release();
/*      */   }
/*      */   
/*      */   public boolean wasNull() throws SQLException {
/*  117 */     return this.m_wasPrivColNull;
/*      */   }
/*      */   
/*      */   public String getString(int columnIndex) throws SQLException {
/*  121 */     checkCurrentRow();
/*      */     
/*  123 */     TypeData typeData = this.m_array.getData(this.m_curRowNum, columnIndex, null);
/*  124 */     if (checkIsNull(typeData)) {
/*  125 */       return null;
/*      */     }
/*  127 */     if ((typeData.m_dumyData instanceof String)) {
/*  128 */       return (String)typeData.m_dumyData;
/*      */     }
/*  130 */     CommDesc desc = this.m_array.getDataDesc(this.m_curRowNum, columnIndex);
/*  131 */     return CType2JType.getString(typeData.m_dataBuf, desc, 0, this.m_conn, false);
/*      */   }
/*      */   
/*      */   public boolean getBoolean(int columnIndex) throws SQLException {
/*  135 */     checkCurrentRow();
/*      */     
/*  137 */     TypeData typeData = this.m_array.getData(this.m_curRowNum, columnIndex, null);
/*  138 */     if (checkIsNull(typeData)) {
/*  139 */       return false;
/*      */     }
/*  141 */     if ((typeData.m_dumyData instanceof Boolean)) {
/*  142 */       return ((Boolean)typeData.m_dumyData).booleanValue();
/*      */     }
/*  144 */     CommDesc desc = this.m_array.getDataDesc(this.m_curRowNum, columnIndex);
/*  145 */     return CType2JType.getBoolean(typeData.m_dataBuf, desc, 0, this.m_conn);
/*      */   }
/*      */   
/*      */   public byte getByte(int columnIndex) throws SQLException {
/*  149 */     checkCurrentRow();
/*      */     
/*  151 */     TypeData typeData = this.m_array.getData(this.m_curRowNum, columnIndex, null);
/*  152 */     if (checkIsNull(typeData)) {
/*  153 */       return 0;
/*      */     }
/*  155 */     if ((typeData.m_dumyData instanceof Byte)) {
/*  156 */       return ((Byte)typeData.m_dumyData).byteValue();
/*      */     }
/*  158 */     CommDesc desc = this.m_array.getDataDesc(this.m_curRowNum, columnIndex);
/*  159 */     return CType2JType.getByte(typeData.m_dataBuf, desc, 0, this.m_conn);
/*      */   }
/*      */   
/*      */   public short getShort(int columnIndex) throws SQLException {
/*  163 */     checkCurrentRow();
/*      */     
/*  165 */     TypeData typeData = this.m_array.getData(this.m_curRowNum, columnIndex, null);
/*  166 */     if (checkIsNull(typeData)) {
/*  167 */       return 0;
/*      */     }
/*  169 */     if ((typeData.m_dumyData instanceof Short)) {
/*  170 */       return ((Short)typeData.m_dumyData).shortValue();
/*      */     }
/*  172 */     CommDesc desc = this.m_array.getDataDesc(this.m_curRowNum, columnIndex);
/*  173 */     return CType2JType.getShort(typeData.m_dataBuf, desc, 0, this.m_conn);
/*      */   }
/*      */   
/*      */   public int getInt(int columnIndex) throws SQLException {
/*  177 */     checkCurrentRow();
/*      */     
/*  179 */     TypeData typeData = this.m_array.getData(this.m_curRowNum, columnIndex, null);
/*  180 */     if (checkIsNull(typeData)) {
/*  181 */       return 0;
/*      */     }
/*  183 */     if ((typeData.m_dumyData instanceof Integer)) {
/*  184 */       return ((Integer)typeData.m_dumyData).intValue();
/*      */     }
/*  186 */     CommDesc desc = this.m_array.getDataDesc(this.m_curRowNum, columnIndex);
/*  187 */     return CType2JType.getInt(typeData.m_dataBuf, desc, 0, this.m_conn);
/*      */   }
/*      */   
/*      */   public long getLong(int columnIndex) throws SQLException {
/*  191 */     checkCurrentRow();
/*      */     
/*  193 */     TypeData typeData = this.m_array.getData(this.m_curRowNum, columnIndex, null);
/*  194 */     if (checkIsNull(typeData)) {
/*  195 */       return 0L;
/*      */     }
/*  197 */     if ((typeData.m_dumyData instanceof Long)) {
/*  198 */       return ((Long)typeData.m_dumyData).longValue();
/*      */     }
/*  200 */     CommDesc desc = this.m_array.getDataDesc(this.m_curRowNum, columnIndex);
/*  201 */     return CType2JType.getLong(typeData.m_dataBuf, desc, 0, this.m_conn);
/*      */   }
/*      */   
/*      */   public float getFloat(int columnIndex) throws SQLException {
/*  205 */     checkCurrentRow();
/*      */     
/*  207 */     TypeData typeData = this.m_array.getData(this.m_curRowNum, columnIndex, null);
/*  208 */     if (checkIsNull(typeData)) {
/*  209 */       return 0.0F;
/*      */     }
/*  211 */     if ((typeData.m_dumyData instanceof Float)) {
/*  212 */       return (float)((Float)typeData.m_dumyData).longValue();
/*      */     }
/*  214 */     CommDesc desc = this.m_array.getDataDesc(this.m_curRowNum, columnIndex);
/*  215 */     return CType2JType.getFloat(typeData.m_dataBuf, desc, 0, this.m_conn);
/*      */   }
/*      */   
/*      */   public double getDouble(int columnIndex) throws SQLException {
/*  219 */     checkCurrentRow();
/*      */     
/*  221 */     TypeData typeData = this.m_array.getData(this.m_curRowNum, columnIndex, null);
/*  222 */     if (checkIsNull(typeData)) {
/*  223 */       return 0.0D;
/*      */     }
/*  225 */     if ((typeData.m_dumyData instanceof Double)) {
/*  226 */       return ((Double)typeData.m_dumyData).doubleValue();
/*      */     }
/*  228 */     CommDesc desc = this.m_array.getDataDesc(this.m_curRowNum, columnIndex);
/*  229 */     return CType2JType.getDouble(typeData.m_dataBuf, desc, 0, this.m_conn);
/*      */   }
/*      */   
/*      */   public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException
/*      */   {
/*  234 */     BigDecimal bg = getBigDecimal(columnIndex);
/*  235 */     if (bg == null) {
/*  236 */       return null;
/*      */     }
/*  238 */     return bg.setScale(scale, 4);
/*      */   }
/*      */   
/*      */   public byte[] getBytes(int columnIndex) throws SQLException {
/*  242 */     checkCurrentRow();
/*      */     
/*  244 */     TypeData typeData = this.m_array.getData(this.m_curRowNum, columnIndex, null);
/*  245 */     if (checkIsNull(typeData)) {
/*  246 */       return null;
/*      */     }
/*  248 */     if ((typeData.m_dumyData instanceof Byte[])) {
/*  249 */       return (byte[])typeData.m_dumyData;
/*      */     }
/*  251 */     CommDesc desc = this.m_array.getDataDesc(this.m_curRowNum, columnIndex);
/*  252 */     return CType2JType.getBytes(typeData.m_dataBuf, desc, 0, this.m_conn);
/*      */   }
/*      */   
/*      */   public Date getDate(int columnIndex) throws SQLException {
/*  256 */     checkCurrentRow();
/*      */     
/*  258 */     TypeData typeData = this.m_array.getData(this.m_curRowNum, columnIndex, null);
/*  259 */     if (checkIsNull(typeData)) {
/*  260 */       return null;
/*      */     }
/*  262 */     if ((typeData.m_dumyData instanceof Date)) {
/*  263 */       return (Date)typeData.m_dumyData;
/*      */     }
/*  265 */     CommDesc desc = this.m_array.getDataDesc(this.m_curRowNum, columnIndex);
/*  266 */     return CType2JType.getDate(typeData.m_dataBuf, desc, 0, this.m_conn);
/*      */   }
/*      */   
/*      */   public Time getTime(int columnIndex) throws SQLException {
/*  270 */     checkCurrentRow();
/*      */     
/*  272 */     TypeData typeData = this.m_array.getData(this.m_curRowNum, columnIndex, null);
/*  273 */     if (checkIsNull(typeData)) {
/*  274 */       return null;
/*      */     }
/*  276 */     if ((typeData.m_dumyData instanceof Time)) {
/*  277 */       return (Time)typeData.m_dumyData;
/*      */     }
/*  279 */     CommDesc desc = this.m_array.getDataDesc(this.m_curRowNum, columnIndex);
/*  280 */     return CType2JType.getTime(typeData.m_dataBuf, desc, 0, this.m_conn);
/*      */   }
/*      */   
/*      */   public Timestamp getTimestamp(int columnIndex) throws SQLException {
/*  284 */     checkCurrentRow();
/*      */     
/*  286 */     TypeData typeData = this.m_array.getData(this.m_curRowNum, columnIndex, null);
/*  287 */     if (checkIsNull(typeData)) {
/*  288 */       return null;
/*      */     }
/*  290 */     if ((typeData.m_dumyData instanceof Timestamp)) {
/*  291 */       return (Timestamp)typeData.m_dumyData;
/*      */     }
/*  293 */     CommDesc desc = this.m_array.getDataDesc(this.m_curRowNum, columnIndex);
/*  294 */     return CType2JType.getTimestamp(typeData.m_dataBuf, desc, 0, this.m_conn);
/*      */   }
/*      */   
/*      */   public InputStream getAsciiStream(int columnIndex) throws SQLException {
/*  298 */     checkCurrentRow();
/*      */     
/*  300 */     TypeData typeData = this.m_array.getData(this.m_curRowNum, columnIndex, null);
/*  301 */     if (checkIsNull(typeData)) {
/*  302 */       return null;
/*      */     }
/*  304 */     CommDesc desc = this.m_array.getDataDesc(this.m_curRowNum, columnIndex);
/*  305 */     return CType2JType.getAsciiStream(typeData.m_dataBuf, desc, this.m_conn);
/*      */   }
/*      */   
/*      */   public InputStream getUnicodeStream(int columnIndex) throws SQLException {
/*  309 */     checkCurrentRow();
/*      */     
/*  311 */     TypeData typeData = this.m_array.getData(this.m_curRowNum, columnIndex, null);
/*  312 */     if (checkIsNull(typeData)) {
/*  313 */       return null;
/*      */     }
/*  315 */     CommDesc desc = this.m_array.getDataDesc(this.m_curRowNum, columnIndex);
/*  316 */     return CType2JType.getUnicodeStream(typeData.m_dataBuf, desc, this.m_conn);
/*      */   }
/*      */   
/*      */   public InputStream getBinaryStream(int columnIndex) throws SQLException {
/*  320 */     checkCurrentRow();
/*      */     
/*  322 */     TypeData typeData = this.m_array.getData(this.m_curRowNum, columnIndex, null);
/*  323 */     if (checkIsNull(typeData)) {
/*  324 */       return null;
/*      */     }
/*  326 */     CommDesc desc = this.m_array.getDataDesc(this.m_curRowNum, columnIndex);
/*  327 */     return CType2JType.getBinaryStream(typeData.m_dataBuf, desc, this.m_conn);
/*      */   }
/*      */   
/*      */   public String getString(String columnName) throws SQLException {
/*  331 */     return getString(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public boolean getBoolean(String columnName) throws SQLException {
/*  335 */     return getBoolean(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public byte getByte(String columnName) throws SQLException {
/*  339 */     return getByte(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public short getShort(String columnName) throws SQLException {
/*  343 */     return getShort(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public int getInt(String columnName) throws SQLException {
/*  347 */     return getInt(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public long getLong(String columnName) throws SQLException {
/*  351 */     return getLong(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public float getFloat(String columnName) throws SQLException {
/*  355 */     return getFloat(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public double getDouble(String columnName) throws SQLException {
/*  359 */     return getDouble(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException
/*      */   {
/*  364 */     return getBigDecimal(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public byte[] getBytes(String columnName) throws SQLException {
/*  368 */     return getBytes(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public Date getDate(String columnName) throws SQLException {
/*  372 */     return getDate(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public Time getTime(String columnName) throws SQLException {
/*  376 */     return getTime(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public Timestamp getTimestamp(String columnName) throws SQLException {
/*  380 */     return getTimestamp(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public InputStream getAsciiStream(String columnName) throws SQLException {
/*  384 */     return getAsciiStream(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public InputStream getUnicodeStream(String columnName) throws SQLException {
/*  388 */     return getUnicodeStream(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public InputStream getBinaryStream(String columnName) throws SQLException {
/*  392 */     return getBinaryStream(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public SQLWarning getWarnings() throws SQLException
/*      */   {
/*  397 */     DBError.throwUnsupportedSQLException();
/*  398 */     return null;
/*      */   }
/*      */   
/*      */   public void clearWarnings()
/*      */     throws SQLException
/*      */   {}
/*      */   
/*      */   public String getCursorName()
/*      */     throws SQLException
/*      */   {
/*  408 */     DBError.throwUnsupportedSQLException();
/*  409 */     return null;
/*      */   }
/*      */   
/*      */   public ResultSetMetaData getMetaData() throws SQLException
/*      */   {
/*  414 */     DBError.throwUnsupportedSQLException();
/*  415 */     return null;
/*      */   }
/*      */   
/*      */   public Object getObject(int columnIndex) throws SQLException {
/*  419 */     checkCurrentRow();
/*      */     
/*  421 */     TypeData typeData = this.m_array.getData(this.m_curRowNum, columnIndex, null);
/*  422 */     if (checkIsNull(typeData)) {
/*  423 */       return null;
/*      */     }
/*  425 */     return typeData.m_dumyData;
/*      */   }
/*      */   
/*      */   public Object getObject(String columnName) throws SQLException {
/*  429 */     return getObject(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public int findColumn(String columnName) throws SQLException
/*      */   {
/*  434 */     DBError.throwUnsupportedSQLException();
/*  435 */     return 0;
/*      */   }
/*      */   
/*      */   public Reader getCharacterStream(int columnIndex) throws SQLException {
/*  439 */     checkCurrentRow();
/*      */     
/*  441 */     TypeData typeData = this.m_array.getData(this.m_curRowNum, columnIndex, null);
/*  442 */     if (checkIsNull(typeData)) {
/*  443 */       return null;
/*      */     }
/*  445 */     CommDesc desc = this.m_array.getDataDesc(this.m_curRowNum, columnIndex);
/*      */     
/*  447 */     return CType2JType.getCharacterStream(typeData.m_dataBuf, desc, this.m_conn);
/*      */   }
/*      */   
/*      */   public Reader getCharacterStream(String columnName) throws SQLException {
/*  451 */     return getCharacterStream(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
/*  455 */     checkCurrentRow();
/*      */     
/*  457 */     TypeData typeData = this.m_array.getData(this.m_curRowNum, columnIndex, null);
/*  458 */     if (checkIsNull(typeData)) {
/*  459 */       return null;
/*      */     }
/*  461 */     if ((typeData.m_dumyData instanceof BigDecimal)) {
/*  462 */       return (BigDecimal)typeData.m_dumyData;
/*      */     }
/*  464 */     CommDesc desc = this.m_array.getDataDesc(this.m_curRowNum, columnIndex);
/*      */     
/*  466 */     return CType2JType.getBigDecimal(typeData.m_dataBuf, desc, 0, this.m_conn);
/*      */   }
/*      */   
/*      */   public BigDecimal getBigDecimal(String columnName) throws SQLException {
/*  470 */     return getBigDecimal(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public boolean isBeforeFirst() throws SQLException {
/*  474 */     if (this.m_curRowNum + 1 <= 0) {
/*  475 */       return true;
/*      */     }
/*  477 */     return false;
/*      */   }
/*      */   
/*      */   public boolean isAfterLast() throws SQLException {
/*  481 */     if (this.m_curRowNum + 1 > this.m_rowCount) {
/*  482 */       return true;
/*      */     }
/*  484 */     return false;
/*      */   }
/*      */   
/*      */   public boolean isFirst() throws SQLException {
/*  488 */     if (this.m_curRowNum + 1 == 1) {
/*  489 */       return true;
/*      */     }
/*  491 */     return false;
/*      */   }
/*      */   
/*      */   public boolean isLast() throws SQLException {
/*  495 */     if (this.m_curRowNum + 1 == this.m_rowCount) {
/*  496 */       return true;
/*      */     }
/*  498 */     return false;
/*      */   }
/*      */   
/*      */   public void beforeFirst() throws SQLException {
/*  502 */     checkClose();
/*      */     
/*  504 */     if (this.m_rowCount <= 0) {
/*  505 */       return;
/*      */     }
/*  507 */     this.m_curRowNum = -1;
/*      */   }
/*      */   
/*      */   public void afterLast() throws SQLException {
/*  511 */     checkClose();
/*      */     
/*  513 */     if (this.m_rowCount <= 0) {
/*  514 */       return;
/*      */     }
/*  516 */     this.m_curRowNum = this.m_rowCount;
/*      */   }
/*      */   
/*      */   public boolean first() throws SQLException {
/*  520 */     checkClose();
/*      */     
/*  522 */     if (this.m_rowCount > 0) {
/*  523 */       this.m_curRowNum = 0;
/*  524 */       return true;
/*      */     }
/*      */     
/*  527 */     return false;
/*      */   }
/*      */   
/*      */   public boolean last() throws SQLException {
/*  531 */     checkClose();
/*      */     
/*  533 */     if (this.m_rowCount > 0) {
/*  534 */       this.m_curRowNum = (this.m_rowCount - 1);
/*  535 */       return true;
/*      */     }
/*      */     
/*  538 */     return false;
/*      */   }
/*      */   
/*      */   public int getRow() throws SQLException {
/*  542 */     return this.m_curRowNum + 1;
/*      */   }
/*      */   
/*      */   public boolean absolute(int row) throws SQLException {
/*  546 */     checkClose();
/*      */     
/*  548 */     if ((Math.abs(row) > this.m_rowCount) || (row == 0)) {
/*  549 */       return false;
/*      */     }
/*      */     
/*  552 */     if (row < 0) {
/*  553 */       this.m_curRowNum = (row + this.m_rowCount);
/*  554 */       return true;
/*      */     }
/*      */     
/*      */ 
/*  558 */     this.m_curRowNum = (row - 1);
/*  559 */     return true;
/*      */   }
/*      */   
/*      */   public boolean relative(int rows) throws SQLException {
/*  563 */     checkClose();
/*      */     
/*  565 */     if (rows == 0) {
/*  566 */       return (!isBeforeFirst()) && (!isAfterLast());
/*      */     }
/*  568 */     int realRow = this.m_curRowNum + rows;
/*  569 */     if ((realRow + 1 > this.m_rowCount) || (realRow + 1 < 1)) {
/*  570 */       return false;
/*      */     }
/*  572 */     this.m_curRowNum = realRow;
/*  573 */     return true;
/*      */   }
/*      */   
/*      */   public boolean previous() throws SQLException {
/*  577 */     checkClose();
/*      */     
/*  579 */     int realRow = this.m_curRowNum - 1;
/*  580 */     if ((realRow < 0) || (realRow >= this.m_rowCount)) {
/*  581 */       return false;
/*      */     }
/*  583 */     this.m_curRowNum = realRow;
/*  584 */     return true;
/*      */   }
/*      */   
/*      */   public void setFetchDirection(int direction) throws SQLException {
/*  588 */     this.m_direction = direction;
/*      */   }
/*      */   
/*      */   public int getFetchDirection() throws SQLException {
/*  592 */     return this.m_direction;
/*      */   }
/*      */   
/*      */   public void setFetchSize(int rows) throws SQLException {
/*  596 */     this.m_fetchSize = rows;
/*      */   }
/*      */   
/*      */   public int getFetchSize() throws SQLException {
/*  600 */     return this.m_fetchSize;
/*      */   }
/*      */   
/*      */   public int getType() throws SQLException {
/*  604 */     return this.m_type;
/*      */   }
/*      */   
/*      */   public int getConcurrency() throws SQLException {
/*  608 */     return this.m_conCurrency;
/*      */   }
/*      */   
/*      */   public boolean rowUpdated() throws SQLException
/*      */   {
/*  613 */     checkUpdatable();
/*  614 */     return false;
/*      */   }
/*      */   
/*      */   public boolean rowInserted() throws SQLException
/*      */   {
/*  619 */     checkUpdatable();
/*  620 */     return false;
/*      */   }
/*      */   
/*      */   public boolean rowDeleted() throws SQLException
/*      */   {
/*  625 */     checkUpdatable();
/*  626 */     return false;
/*      */   }
/*      */   
/*      */   public void updateNull(int columnIndex) throws SQLException
/*      */   {
/*  631 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateBoolean(int columnIndex, boolean x) throws SQLException
/*      */   {
/*  636 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateByte(int columnIndex, byte x) throws SQLException
/*      */   {
/*  641 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateShort(int columnIndex, short x) throws SQLException
/*      */   {
/*  646 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateInt(int columnIndex, int x) throws SQLException
/*      */   {
/*  651 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateLong(int columnIndex, long x) throws SQLException
/*      */   {
/*  656 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateFloat(int columnIndex, float x) throws SQLException
/*      */   {
/*  661 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateDouble(int columnIndex, double x) throws SQLException
/*      */   {
/*  666 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateBigDecimal(int columnIndex, BigDecimal x)
/*      */     throws SQLException
/*      */   {
/*  672 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateString(int columnIndex, String x) throws SQLException
/*      */   {
/*  677 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateBytes(int columnIndex, byte[] x) throws SQLException
/*      */   {
/*  682 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateDate(int columnIndex, Date x) throws SQLException
/*      */   {
/*  687 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateTime(int columnIndex, Time x) throws SQLException
/*      */   {
/*  692 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateTimestamp(int columnIndex, Timestamp x)
/*      */     throws SQLException
/*      */   {
/*  698 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateAsciiStream(int columnIndex, InputStream x, int length)
/*      */     throws SQLException
/*      */   {
/*  704 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateBinaryStream(int columnIndex, InputStream x, int length)
/*      */     throws SQLException
/*      */   {
/*  710 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateCharacterStream(int columnIndex, Reader x, int length)
/*      */     throws SQLException
/*      */   {
/*  716 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateObject(int columnIndex, Object x, int scale)
/*      */     throws SQLException
/*      */   {
/*  722 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateObject(int columnIndex, Object x) throws SQLException
/*      */   {
/*  727 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateNull(String columnName) throws SQLException {
/*  731 */     updateNull(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public void updateBoolean(String columnName, boolean x) throws SQLException {
/*  735 */     updateBoolean(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateByte(String columnName, byte x) throws SQLException {
/*  739 */     updateByte(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateShort(String columnName, short x) throws SQLException {
/*  743 */     updateShort(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateInt(String columnName, int x) throws SQLException {
/*  747 */     updateInt(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateLong(String columnName, long x) throws SQLException {
/*  751 */     updateLong(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateFloat(String columnName, float x) throws SQLException {
/*  755 */     updateFloat(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateDouble(String columnName, double x) throws SQLException {
/*  759 */     updateDouble(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException
/*      */   {
/*  764 */     updateBigDecimal(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateString(String columnName, String x) throws SQLException {
/*  768 */     updateString(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateBytes(String columnName, byte[] x) throws SQLException {
/*  772 */     updateBytes(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateDate(String columnName, Date x) throws SQLException {
/*  776 */     updateDate(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateTime(String columnName, Time x) throws SQLException {
/*  780 */     updateTime(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateTimestamp(String columnName, Timestamp x) throws SQLException
/*      */   {
/*  785 */     updateTimestamp(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateAsciiStream(String columnName, InputStream x, int length) throws SQLException
/*      */   {
/*  790 */     updateAsciiStream(findColumn(columnName), x, length);
/*      */   }
/*      */   
/*      */   public void updateBinaryStream(String columnName, InputStream x, int length) throws SQLException
/*      */   {
/*  795 */     updateBinaryStream(findColumn(columnName), x, length);
/*      */   }
/*      */   
/*      */   public void updateCharacterStream(String columnName, Reader reader, int length) throws SQLException
/*      */   {
/*  800 */     updateCharacterStream(findColumn(columnName), reader, length);
/*      */   }
/*      */   
/*      */   public void updateObject(String columnName, Object x, int scale) throws SQLException
/*      */   {
/*  805 */     updateObject(findColumn(columnName), x, scale);
/*      */   }
/*      */   
/*      */   public void updateObject(String columnName, Object x) throws SQLException {
/*  809 */     updateObject(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void insertRow() throws SQLException
/*      */   {
/*  814 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateRow() throws SQLException
/*      */   {
/*  819 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void deleteRow() throws SQLException
/*      */   {
/*  824 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void refreshRow() throws SQLException
/*      */   {
/*  829 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void cancelRowUpdates() throws SQLException
/*      */   {
/*  834 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void moveToInsertRow() throws SQLException
/*      */   {
/*  839 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void moveToCurrentRow() throws SQLException
/*      */   {
/*  844 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public Statement getStatement() throws SQLException
/*      */   {
/*  849 */     checkUpdatable();
/*  850 */     return null;
/*      */   }
/*      */   
/*      */   public Object getObject(int i, Map map) throws SQLException
/*      */   {
/*  855 */     DBError.throwUnsupportedSQLException();
/*  856 */     return null;
/*      */   }
/*      */   
/*      */   public Ref getRef(int i) throws SQLException
/*      */   {
/*  861 */     DBError.throwUnsupportedSQLException();
/*  862 */     return null;
/*      */   }
/*      */   
/*      */   public Blob getBlob(int i) throws SQLException {
/*  866 */     checkCurrentRow();
/*      */     
/*  868 */     TypeData typeData = this.m_array.getData(this.m_curRowNum, i, null);
/*  869 */     if (checkIsNull(typeData)) {
/*  870 */       return null;
/*      */     }
/*  872 */     if ((typeData.m_dumyData instanceof Blob)) {
/*  873 */       return (Blob)typeData.m_dumyData;
/*      */     }
/*  875 */     CommDesc desc = this.m_array.getDataDesc(this.m_curRowNum, i);
/*      */     
/*  877 */     return CType2JType.getBlob(typeData.m_dataBuf, desc, this.m_conn);
/*      */   }
/*      */   
/*      */   public Clob getClob(int i) throws SQLException {
/*  881 */     checkCurrentRow();
/*      */     
/*  883 */     TypeData typeData = this.m_array.getData(this.m_curRowNum, i, null);
/*  884 */     if (checkIsNull(typeData)) {
/*  885 */       return null;
/*      */     }
/*  887 */     if ((typeData.m_dumyData instanceof Clob)) {
/*  888 */       return (Clob)typeData.m_dumyData;
/*      */     }
/*  890 */     CommDesc desc = this.m_array.getDataDesc(this.m_curRowNum, i);
/*      */     
/*  892 */     return CType2JType.getClob(typeData.m_dataBuf, desc, this.m_conn);
/*      */   }
/*      */   
/*      */   public Array getArray(int i) throws SQLException {
/*  896 */     checkCurrentRow();
/*      */     
/*  898 */     TypeData typeData = this.m_array.getData(this.m_curRowNum, i, null);
/*  899 */     if (checkIsNull(typeData)) {
/*  900 */       return null;
/*      */     }
/*  902 */     if ((typeData.m_dumyData instanceof ARRAY)) {
/*  903 */       return (Array)typeData.m_dumyData;
/*      */     }
/*  905 */     CommDesc desc = this.m_array.getDataDesc(this.m_curRowNum, i);
/*  906 */     return CType2JType.getArray(typeData.m_dataBuf, desc, this.m_conn);
/*      */   }
/*      */   
/*      */   public Object getObject(String colName, Map map) throws SQLException
/*      */   {
/*  911 */     DBError.throwUnsupportedSQLException();
/*  912 */     return null;
/*      */   }
/*      */   
/*      */   public Ref getRef(String colName) throws SQLException {
/*  916 */     return getRef(findColumn(colName));
/*      */   }
/*      */   
/*      */   public Blob getBlob(String colName) throws SQLException {
/*  920 */     return getBlob(findColumn(colName));
/*      */   }
/*      */   
/*      */   public Clob getClob(String colName) throws SQLException {
/*  924 */     return getClob(findColumn(colName));
/*      */   }
/*      */   
/*      */   public Array getArray(String colName) throws SQLException {
/*  928 */     return getArray(findColumn(colName));
/*      */   }
/*      */   
/*      */   public Date getDate(int columnIndex, Calendar cal) throws SQLException {
/*  932 */     Date date = getDate(columnIndex);
/*  933 */     if (date == null) {
/*  934 */       return null;
/*      */     }
/*  936 */     if (cal == null) {
/*  937 */       cal = Calendar.getInstance();
/*      */     }
/*  939 */     cal.clear();
/*  940 */     cal.setTime(date);
/*  941 */     return new Date(cal.getTimeInMillis());
/*      */   }
/*      */   
/*      */   public Date getDate(String columnName, Calendar cal) throws SQLException {
/*  945 */     return getDate(findColumn(columnName), cal);
/*      */   }
/*      */   
/*      */   public Time getTime(int columnIndex, Calendar cal) throws SQLException {
/*  949 */     Time time = getTime(columnIndex);
/*  950 */     if (time == null) {
/*  951 */       return null;
/*      */     }
/*  953 */     if (cal == null) {
/*  954 */       cal = Calendar.getInstance();
/*      */     }
/*  956 */     cal.clear();
/*  957 */     cal.setTimeInMillis(time.getTime());
/*      */     
/*  959 */     return new Time(cal.getTimeInMillis());
/*      */   }
/*      */   
/*      */   public Time getTime(String columnName, Calendar cal) throws SQLException {
/*  963 */     return getTime(findColumn(columnName), cal);
/*      */   }
/*      */   
/*      */   public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException
/*      */   {
/*  968 */     Timestamp timestamp = getTimestamp(columnIndex);
/*  969 */     if (timestamp == null) {
/*  970 */       return null;
/*      */     }
/*  972 */     if (cal == null) {
/*  973 */       cal = Calendar.getInstance();
/*      */     }
/*  975 */     cal.clear();
/*  976 */     cal.setTimeInMillis(timestamp.getTime());
/*      */     
/*  978 */     return new Timestamp(cal.getTimeInMillis());
/*      */   }
/*      */   
/*      */   public Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException
/*      */   {
/*  983 */     return getTimestamp(findColumn(columnName), cal);
/*      */   }
/*      */   
/*      */   public URL getURL(int columnIndex) throws SQLException
/*      */   {
/*  988 */     DBError.throwUnsupportedSQLException();
/*  989 */     return null;
/*      */   }
/*      */   
/*      */   public URL getURL(String columnName) throws SQLException {
/*  993 */     return getURL(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public void updateRef(int columnIndex, Ref x) throws SQLException
/*      */   {
/*  998 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateRef(String columnName, Ref x) throws SQLException {
/* 1002 */     updateRef(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateBlob(int columnIndex, Blob x) throws SQLException
/*      */   {
/* 1007 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateBlob(String columnName, Blob x) throws SQLException {
/* 1011 */     updateBlob(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateClob(int columnIndex, Clob x) throws SQLException
/*      */   {
/* 1016 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateClob(String columnName, Clob x) throws SQLException
/*      */   {
/* 1021 */     updateClob(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateArray(int columnIndex, Array x) throws SQLException
/*      */   {
/* 1026 */     checkUpdatable();
/*      */   }
/*      */   
/*      */   public void updateArray(String columnName, Array x) throws SQLException
/*      */   {
/* 1031 */     updateArray(findColumn(columnName), x);
/*      */   }
/*      */ }


/* Location:              D:\Program Files\DBMS_20150813\jdbc\Dm7JdbcDriver17.jar!\dm\sql\DmdbArrayDataResultSet.class
 * Java compiler version: 2 (46.0)
 * JD-Core Version:       0.7.1
 */